<?php
class AdminController extends AppController {
	var $name = 'Admin';
	var $helpers = array('tinyMce');
	var $uses = array();
	var $layout = 'admin';
	
	function login() {
		
	}
	
	function article_list() {
		if ($this->data) {
			
		}else {
			
		}
		
		$conditions = array();
		$this->loadModel('Article');
		
		$this->paginate = array(
			'conditions' => $conditions,
			'order' => array(
				'Article.publish_flg ASC',
				'Article.create_time DESC'
			),
			'limit' => 20,
			'page' => 1
		);
		$articleLists = $this->paginate('Article');
		
		$this->set(compact('articleLists'));
	}
	
	function add_article() {
		$this->layout = 'admin';
		if ($this->data) {
			
		}
	}
}